package com.zw.cc.controller;

import com.zw.cc.model.UserLoginEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.Date;

/**
 * Created by zwz
 * date 2016/12/22
 * project com.zw.cc.controller
 */
@Controller
public class TestController {

    @RequestMapping("/test")
    public String method(Model model, HttpSession session) {
        UserLoginEntity userLoginEntity = new UserLoginEntity();
        userLoginEntity.setAccount("myAccount   ");
        userLoginEntity.setPassword("12345/\\6");
        model.addAttribute("user", userLoginEntity);
        model.addAttribute("serverDate", new Date());
        model.addAttribute("message", "<b>abc</b>");
        return "test";
    }
}
